var HsetIcon={};//icon图标
HsetIcon['up']='icon-upload';//上架
HsetIcon['down']='icon-download';//下架
HsetIcon['upload']='icon-upload';//上传
HsetIcon['view']=' icon-view ';//查看
HsetIcon['detail']='icon-detail';//详情
HsetIcon['download']='icon-download';//下载
HsetIcon['submit']='icon-upload0';//提交
HsetIcon['submit2']='icon-submit2';//提交2
HsetIcon['users']='icon-distribute ';//分配人员
HsetIcon['add']='icon-new ';//添加
HsetIcon['update']='icon-modify ';//修改
HsetIcon['delete']='icon-dele ';//删除
HsetIcon['assign']='icon-power';//权限配置
HsetIcon['split']='icon-split';//拆分
HsetIcon['transfer']='icon-alter ';//转让订单
HsetIcon['invalid']='icon-abandon ';//作废
HsetIcon['sold']='icon-sold';//sold订单
HsetIcon['merge']='icon-joint ';//合并
HsetIcon['generate']='icon-invoice ';//生成合同
HsetIcon['contractcn-c']='icon-contractcn-c';//生成中文合同
HsetIcon['contracten-e']='icon-contracten-e';//生成英文合同
HsetIcon['finish']='icon-finish ';//完成
HsetIcon['userDiscount']='icon-agio ';//用户折扣
HsetIcon['clear']='icon-clearl';//清空日志
HsetIcon['clear2']='icon-clear';//清空
HsetIcon['appoint']='icon-appoint';//指定
HsetIcon['back']='icon-back';//返回
HsetIcon['bulk']='icon-bulk';//导入
HsetIcon['bulk2']='icon-bulk2';//导入2
HsetIcon['claim']='icon-claim';//认领
HsetIcon['pass']='icon-pass';//通过
HsetIcon['preview']='icon-preview';//预览
HsetIcon['recover']='icon-recover';//恢复
HsetIcon['reject']='icon-reject';//驳回
HsetIcon['reset']='icon-reset';//重置
HsetIcon['search']='icon-search';//搜索
HsetIcon['set']='icon-set';//设置
HsetIcon['take']='icon-take';//领取
HsetIcon['ordersNoStrategy']='icon-Order-number';//订单号策略
HsetIcon['pactNoStrategy']='icon-contract';//合同编号策略
HsetIcon['exhibitionGroup']='icon-group';//展会小组
HsetIcon['ordersProduct']='icon-product';//订单产品
HsetIcon['hall']='icon-Exhibition';//展馆
HsetIcon['salesTask']='icon-sell';//销售任务
HsetIcon['open']='icon-kaiqi';//开启
HsetIcon['close']='icon-yhhghg';//关闭
HsetIcon['closePage']='icon-yhhghg';//关闭页面 ×
HsetIcon['Grouping']='icon-Grouping';//分组
HsetIcon['modifyPassword']='icon-ugiuh';//修改密码
HsetIcon['personal']='icon-personal';//个人资料
HsetIcon['exit']='icon-Sign-out';//退出
HsetIcon['Submit']='icon-Submit';//提交
HsetIcon['backNew']='icon-gbhm';//返回

/**
 * 创建操作按钮组
 * @param data [{clickEvent:单击事件,title:标题,icon:图标,active:是否活跃}]
 */
HsetIcon.createGroup=function(data,max,id){
    if(!max){
        max = 3;//每行最大按钮数
    }
    var node = [];
    if(data != null){
        var len  =data.length;
        for (var i  = 0; i < len; i++) {
            if(i>=max){//如果为第 max 个按钮 打断  每行最多显示 max 个按钮
                break;
            }
            var item = data[i];
            if(item.active==true){
                //如果为活跃按钮 即 可点击按钮
                node.push('<a href="###" onclick="'+item.clickEvent+'"><i class="'+item.icon+' tubiaozu hand cblue" title="'+item.title+'"></i></a>');
            }else{
                //不可点击按钮
                node.push('<a href="###"><i class="'+item.icon+' tubiaozu hand" title="'+item.title+'"></i></a>');
            }
        }
        if(len >max){//如果按钮数 大于  max 则 添加更多按钮图标
            node.push('<div class="btn-group roll-nav roll-right smallTriangle">');
            node.push('<button class="dropdown J_tabClose" data-toggle="dropdown" title="更多操作"><span class="caret"></span></button>');
            node.push('<ul role="menu" class="dropdown-menu dropdown-menu-right">');
            for (var i  = 0; i < data.length; i++) {
                var item = data[i];
                if(item.active==true){
                    //如果为活跃按钮 即 可点击按钮
                    node.push('<li class="J_tabCloseAll"><a href="###" onclick="'+item.clickEvent+'"><i class="'+item.icon+' tubiaozu hand cblue"></i>&nbsp;'+item.title+'</a></li>');
                }else{
                    //不可点击按钮
                    node.push('<li class="J_tabCloseAll"><a href="###"><i class="'+item.icon+' tubiaozu hand"></i>&nbsp;'+item.title+'</a></li>');
                }
            }
            node.push('</ul>');
            node.push('</div>');
        }
    }

    if(id){
        node.push("<input type='hidden' name='id' value='"+id+"'>");
    }
    return  node.join('');
};